<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jQuery选择器</title>
    <script src="/D:/TempFiles/IntellijIdea/Pisum/SimpleWeb/src/main/webapps/libs/jquery-1.11.3.js"></script>
    <style>
        div{
            color:red;
            /*background: white;*/
            width: 100px;
            height: 90px;
            float: left;
            padding: 5px;
            margin: 5px;
            background-color: #EEEEEE;
        }
    </style>
</head>
<body>

    <div id="aaron">
        <p>id="aaron"</p>
        <p>选中</p>
    </div>
    <div id="imooc">
        <p>id="imooc"</p>
        <p>jQuery选中</p>
    </div>
    <div id="imooc1">
        <p>id="imooc1"</p>
        <p>jQuery未选中</p>
    </div>

    <script type="text/javascript">
        //通过原生方法处理
        var div = document.getElementById('aaron');
        div.style.border = "3px solid blue";
    </script>

    <script type="text/javascript">
        //通过jQuery直接传入id
        //id的唯一，只选择到了第一个匹配的id为imooc的div节点
        $("#imooc").css("border", "3px solid red");
    </script>
</body>
</html>